package game.resource.loader.tagparser;

import org.xml.sax.Attributes;

import common.Log;

public class MaskTagParser implements TagParser_I {
	public byte MaskColor = 0;
	public boolean GenerateMask;
	
	@Override
	public boolean parse(String tag, Attributes attributes) {
		if(!tag.toLowerCase().equals("mask")) {
			return false;
		}


		String cString = attributes.getValue("color");
		try {
			MaskColor = (byte)(Integer.parseInt(cString));
		} catch (NumberFormatException e) {
			Log.warning("Bad format of mask color string.");
			MaskColor = 0;
			return false;
		}
		GenerateMask = true;
		return true;
	}
}
